<template>
    <el-dialog title="新建文件" :visible.sync="getDialogStatus.stNewFile">
        行
        <el-row>
            <el-col :span="17">
                <el-slider v-model="inputRow"></el-slider>    
            </el-col>
            <el-col :span="1">
                &nbsp;
            </el-col>
            <el-col :span="6">
                <el-input v-model="inputRow" placeholder="行"></el-input>    
            </el-col>
        </el-row>
        列
        <el-row>
            <el-col :span="17">
                <el-slider v-model="inputCol"></el-slider>    
            </el-col>
            <el-col :span="1">
                &nbsp;
            </el-col>
            <el-col :span="6">
                <el-input v-model="inputCol" placeholder="行"></el-input>    
            </el-col>
        </el-row>
        <el-row>
            <br>
            <el-col :span="17">
                <el-checkbox v-model="isFull">是否填充</el-checkbox> 
            </el-col>
        </el-row>
        
        <div slot="footer" class="dialog-footer">
            <el-button @click="closeAllDialog">取 消</el-button>
            <el-button type="primary" @click="newFile">确 定</el-button>
        </div>
        
    </el-dialog>
</template>

<script>

import {mapMutations,mapGetters} from 'vuex';

export default {
    props:{
        visible:{
            type: Boolean,
            default:false
        }
    },
    data() {
        return {
            dialogTableVisible: false,
            inputRow:10,
            inputCol:10,
            isFull:false
        };
    },
    computed:{
        ...mapGetters(['getDialogStatus'])
    },
    watch:{
        
    },
    methods:{
        ...mapMutations(['newTable','setDialogStatus','closeAllDialog']),
        newFile(){
            this.setDialogStatus({
               key:"stNewFile",
               value:false
            });
            this.newTable({
                row:this.inputRow,//行
                col:this.inputCol,//列
                isFull:this.isFull
            });
            this.$router.push('/sheets');
        },
    }
}
</script>

<style>

</style>
